.class public final Lnbisdk/pd;
.super Lnbisdk/mx;

# interfaces
.implements Lnbisdk/iz;


# instance fields
.field private uU:Lnbisdk/se;

.field private uV:Lnbisdk/ff;


# direct methods
.method public constructor <init>(Lnbisdk/ff;)V
    .locals 0

    invoke-direct {p0}, Lnbisdk/mx;-><init>()V

    iput-object p1, p0, Lnbisdk/pd;->uV:Lnbisdk/ff;

    return-void
.end method


# virtual methods
.method public final a(Lnbisdk/dz;)V
    .locals 1

    iget-object v0, p0, Lnbisdk/pd;->uV:Lnbisdk/ff;

    invoke-interface {v0, p0}, Lnbisdk/ff;->onRequestCancelled(Lcom/navbuilder/nb/b;)V

    return-void
.end method

.method public final a(Lnbisdk/dz;I)V
    .locals 1

    iget-object v0, p0, Lnbisdk/pd;->uV:Lnbisdk/ff;

    invoke-interface {v0, p2, p0}, Lnbisdk/ff;->onRequestProgress(ILcom/navbuilder/nb/b;)V

    return-void
.end method

.method public final a(Lnbisdk/dz;Lcom/navbuilder/nb/NBException;)V
    .locals 1

    const/4 v0, 0x0

    iput-boolean v0, p0, Lnbisdk/pd;->cB:Z

    iget-object v0, p0, Lnbisdk/pd;->uV:Lnbisdk/ff;

    invoke-interface {v0, p2, p0}, Lnbisdk/ff;->onRequestError(Lcom/navbuilder/nb/NBException;Lcom/navbuilder/nb/b;)V

    return-void
.end method

.method public final a(Lnbisdk/dz;Lnbisdk/fk;)V
    .locals 7

    const-wide/16 v5, 0x2

    const/4 v4, 0x2

    const/4 v0, 0x0

    :try_start_0
    iput-boolean v0, p0, Lnbisdk/pd;->cB:Z

    iget-object v0, p0, Lnbisdk/pd;->uU:Lnbisdk/se;

    invoke-static {p2, v0}, Lnbisdk/la;->b(Lnbisdk/fk;Lnbisdk/ha;)Lnbisdk/nm;

    move-result-object v0

    invoke-static {p2}, Lnbisdk/pd;->b(Lnbisdk/fk;)Ljava/lang/Object;

    move-result-object v1

    invoke-virtual {v0, v1}, Lnbisdk/nm;->c(Ljava/lang/Object;)V

    invoke-static {p2}, Lnbisdk/pd;->c(Lnbisdk/fk;)Z

    move-result v1

    invoke-virtual {v0, v1}, Lnbisdk/nm;->t(Z)V

    const-string v1, "spelling-suggestion"

    invoke-static {p2, v1}, Lnbisdk/ij$a;->c(Lnbisdk/fk;Ljava/lang/String;)Lnbisdk/fk;

    move-result-object v1

    if-eqz v1, :cond_0

    new-instance v2, Lnbisdk/rb;

    const-string v3, "search-filter"

    invoke-static {v1, v3}, Lnbisdk/ij$a;->c(Lnbisdk/fk;Ljava/lang/String;)Lnbisdk/fk;

    move-result-object v1

    invoke-direct {v2, v1}, Lnbisdk/rb;-><init>(Lnbisdk/fk;)V

    new-instance v1, Lnbisdk/nc;

    invoke-direct {v1, v2}, Lnbisdk/nc;-><init>(Lnbisdk/lg;)V

    :cond_0
    iget-object v1, p0, Lnbisdk/pd;->uV:Lnbisdk/ff;

    invoke-interface {v1, v0, p0}, Lnbisdk/ff;->a(Lnbisdk/sk;Lnbisdk/mx;)V

    iget-object v0, p0, Lnbisdk/pd;->uV:Lnbisdk/ff;

    invoke-interface {v0, p0}, Lnbisdk/ff;->onRequestComplete(Lcom/navbuilder/nb/b;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    return-void

    :catch_0
    move-exception v0

    const-string v1, "Internal Exception on Local Search Handling"

    invoke-static {v1, v5, v6, v4}, Lnbisdk/pn;->a(Ljava/lang/String;JB)V

    invoke-static {v0, v5, v6, v4}, Lnbisdk/pn;->a(Ljava/lang/Throwable;JB)V

    iget-object v1, p0, Lnbisdk/pd;->uV:Lnbisdk/ff;

    new-instance v2, Lcom/navbuilder/nb/NBException;

    const/16 v3, 0x42

    invoke-direct {v2, v3, v0}, Lcom/navbuilder/nb/NBException;-><init>(ILjava/lang/Exception;)V

    invoke-interface {v1, v2, p0}, Lnbisdk/ff;->onRequestError(Lcom/navbuilder/nb/NBException;Lcom/navbuilder/nb/b;)V

    goto :goto_0
.end method

.method public final a(Lnbisdk/ld;)V
    .locals 2

    iget-boolean v0, p0, Lnbisdk/pd;->cB:Z

    if-eqz v0, :cond_0

    new-instance v0, Ljava/lang/IllegalStateException;

    const-string v1, "Another request is in progress"

    invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_0
    const/4 v0, 0x1

    iput-boolean v0, p0, Lnbisdk/pd;->cB:Z

    new-instance v0, Lnbisdk/se;

    invoke-direct {v0, p1, p0}, Lnbisdk/se;-><init>(Lnbisdk/em;Lnbisdk/iz;)V

    iput-object v0, p0, Lnbisdk/pd;->uU:Lnbisdk/se;

    iget-object v0, p0, Lnbisdk/pd;->uV:Lnbisdk/ff;

    invoke-interface {v0, p0}, Lnbisdk/ff;->onRequestStart(Lcom/navbuilder/nb/b;)V

    iget-object v0, p0, Lnbisdk/pd;->uU:Lnbisdk/se;

    invoke-virtual {v0}, Lnbisdk/se;->start()V

    return-void
.end method

.method public final b(Lnbisdk/dz;)V
    .locals 1

    const/4 v0, 0x0

    iput-boolean v0, p0, Lnbisdk/pd;->cB:Z

    iget-object v0, p0, Lnbisdk/pd;->uV:Lnbisdk/ff;

    invoke-interface {v0, p0}, Lnbisdk/ff;->onRequestTimedOut(Lcom/navbuilder/nb/b;)V

    return-void
.end method

.method public final cancelRequest()V
    .locals 1

    iget-boolean v0, p0, Lnbisdk/pd;->cB:Z

    if-eqz v0, :cond_0

    iget-object v0, p0, Lnbisdk/pd;->uU:Lnbisdk/se;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lnbisdk/pd;->uU:Lnbisdk/se;

    invoke-virtual {v0}, Lnbisdk/se;->cancel()V

    const/4 v0, 0x0

    iput-object v0, p0, Lnbisdk/pd;->uU:Lnbisdk/se;

    :cond_0
    const/4 v0, 0x0

    iput-boolean v0, p0, Lnbisdk/pd;->cB:Z

    return-void
.end method
